﻿<Page x:Class="MoreEPG.View.ChannelConfigView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Helper="clr-namespace:Wpf.DragDrop;assembly=Wpf.DragDrop"
        mc:Ignorable="d"
        d:DesignHeight="400"
        d:DesignWidth="550"
        DataContext="{Binding ChannelConfig, Source={StaticResource Locator}}">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Skins/MainSkin.xaml" />
                <ResourceDictionary Source="/Skins/Theme.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Border x:Name="Border2" Grid.Column="1" Margin="3" BorderBrush="GhostWhite" BorderThickness="1" CornerRadius="10">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.4*"></RowDefinition>
                <RowDefinition Height="4*"></RowDefinition>
                <RowDefinition Height="0.6*"></RowDefinition>
                <RowDefinition Height="0.6*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="MC Channel Configuration :" FontSize="12" HorizontalAlignment="Left" Foreground="White">
                <Label.Effect>
                    <DropShadowEffect></DropShadowEffect>
                </Label.Effect>
            </Label>
            <ListView HorizontalAlignment="Left"
                      Width="490"
                      HorizontalContentAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      Grid.ColumnSpan="3"
                      Background="{StaticResource SteelBrush}"
                      Grid.Column="0"
                      Grid.Row="1"
                      Margin="10,10,10,0"
                      ItemsSource="{Binding CVS.View}" 
                      AllowDrop="True">
                <ListView.Resources>
                    <ResourceDictionary Source="/Skins/ListViewStyleGrid.xaml" ></ResourceDictionary>
                </ListView.Resources>
                <ListView.View>
                    <GridView AllowsColumnReorder="False">
                        <GridViewColumn Header="Num" Width="45"></GridViewColumn>
                        <GridViewColumn Header="Disabled" Width="80" HeaderTemplate="{DynamicResource DisabledHeader}" />
                        <GridViewColumn Header="Channel"  Width="180"></GridViewColumn>
                        <GridViewColumn Header="Type"  Width="80"></GridViewColumn>
                        <GridViewColumn Header="Inband" Width="80" HeaderTemplate="{DynamicResource InbandHeader}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Height="26">
                <RadioButton Margin="10,5,5,5" Content="All Channels" IsChecked="{Binding All}"></RadioButton>
                <RadioButton Margin="5" Content="Only TV Channels" IsChecked="{Binding TV}"></RadioButton>
                <RadioButton Margin="5" Content="Only Radio Channels" IsChecked="{Binding Radio}"></RadioButton>
                <CheckBox Margin="5" Content="Hide Blocked Channels" IsChecked="{Binding Hide}"></CheckBox>
            </StackPanel>
            <Button  Style="{DynamicResource RoundedButton}"
                     ToolTip="Save to Media Center"
                     Grid.Column="0" 
                     Margin="10,0,0,0"
                     Grid.Row="3" 
                     Width="60" 
                     Height="25" 
                     Background="LightSteelBlue" 
                     Content="Save" 
                     Command="{Binding Save}"
                     HorizontalAlignment="Left">
            </Button>
        </Grid>
    </Border>
</Page>
